package com.longchat.repository;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.longchat.domain.system.Role;

public interface RoleJpaRepository extends CrudRepository<Role, Integer> {

	@Query("select r.resource from Role r join r.user u where u.userName=?1")
	List<Resource> queryPermissionByUserName(String userName);
	

}
